<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
</head>
<link href="${ctx}/css/main/base.css" rel="stylesheet" type="text/css"/>
<link href="${ctx}/css/main/main.css" rel="stylesheet" type="text/css"/>

<body class="m_6" style="over">
<div id="main">
	<div class="zdsz" id="select1">
		<div class="tab"><h3 class="sel" onclick="f1();">管理角色</h3><h3 onclick="f2();">新建角色</h3><h3 onclick="f3();">调整角色序号高低</h3><h3 onclick="f4();">添加／删除权限</h3></div>
		<div class="zd_gut">
		<ul class="block">
		<li>
				<table width="70%" border="0" cellspacing="0" cellpadding="0" class="tab_1 center" align="center">
				  <tr>
					<td class="bg4">角色排序号</td>
					<td class="bg4">角色名称</td>
					<td class="bg4">操作</td>
				  </tr>
				 <s:iterator value="roles" status="role">
				  <tr>
					<td>${roleOrder}</td>
					<td>${roleName}</td>
					<td>
					<a href="${ctx}/role/role_preModifyPermission.action?baseRole.roleId=${roleId}">设置权限</a>
					<c:if test="${roleId != '0'}">
						<a href="${ctx}/role/role!preModify.action?baseRole.roleId=${roleId}">编辑</a> 　
						<!-- 
						<a href="#" onclick="deleteRole('<s:property value="roleId"></s:property>');">删除</a>
						 -->
					</c:if>
					</td>
				  </tr>
				 </s:iterator>
				</table>
		</li>
		</ul>
		<div class="bihe"></div>
		</div>
	</div>
</div>
</body>
</html>
<script type="text/javascript">
	function deleteRole(str){
		if(window.confirm("确定要删除该角色?")){
			window.location = "${ctx}/role/role_delete.action?baseRole.roleId="+str;
		}
	}
	
	function f1(){
		window.location = "${ctx}/role/role!index.action";
	}
	function f2(){
		window.location = "${ctx}/role/role!preCreate.action";
	}
	function f3(){
		window.location = "${ctx}/role/role!preModifyOrder.action";
	}
	function f4(){
		window.location = "${ctx}/role/role!preManagePermission.action";
	}
</script>
